Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Editor Templates for Complex Types in Asp.net MVC

Hi Friends, This is a small article about editor templates in Asp.net MVC. What are they? Why do we need them and what are the scenarios where these editor templates can be used?. Let's find out. Editor templates are provided in asp.net...

Partial View in Asp.Net MVC with Example

Hi Friends, In this blog we'll take a look at the use of partial views in asp.net MVC. So what may be the scenarios of using a partial view in code and why is this "partial"?. Let's dive in.  What will you do if you n...

Remote Validation in Asp.Net MVC

Hi Friends Whenever we register a user in our registration form we need to check for existence of current email/user name or any unique identification property. You certainly don't want two users to be registered with same email ...

Difference between ASP.NET Web Form and ASP.NET MVC?

Difference between ASP.NET Web Form and ASP.NET MVC? ASP.NET Web Form Views i.e web Form(aspx) is tightly coupled to logic i.e  code behind(aspx.cs).  Traditional event driven model is followed. For consistent look and feel...

Using async with ASP.NET MVC 5

ASP.NET has a pool of threads to service incoming requests. Once a new request is received a new thread is picked from the thread pool to service this request and this thread cannot serve any other request until the current request gets complet...

ASP.NET MVC 5 : New Features

ASP.NET MVC 5 is the a major new release which has introduced new features as below: 1) One ASP.NET On selecting a New Project from the VS 2013 unlike in previous version we will see one template called ASP.NET Web Application.After ...

Get both text and value of selected option in a dropdown in Asp.Net MVC

How to get both text and value of selected option in a dropdown in Asp.Net MVC? While working in a MVC project, I got a requirement where I needed both Value as well as Text of the selected option in the Dropdown. The solution that ...

ASP.NET MVC HTML Helpers

We use HTML helpers in a view to render HTML content. An HTML Helper is simply a method that returns a string. The string can represent any type of content that we want to define. The ASP.NET MVC framework includes the following set of stan...

ASP.NET MVC Areas

We already know that ASP.NET MVC framework includes separate folders for Model, View and Controller. However a large application can include a large number of controller, views and model which is difficult to manage. Areas help in splitting such ...

ASP.NET MVC Life Cycle

In a MVC application the requests are routed to a special class called the Controller. The controller is responsible for generating the response and sending the content back to the browser. When an MVC application receives request the action m...

ASP.NET MVC : ActionResult Types

An ActionResult is a return type of a controller method in MVC. We can return various types of results as ActionResult. Here, we will discuss about some of the ActionResults available as part of ASP.NET MVC. 1) ViewResult It renders a sp...

ASP.NET : Use of AllowAnonymous attribute

The AllowAnonymous attribute was introduced in ASP.NET MVC 4.This attribute is used for specifying those controller actions that can be accessed by anonymous users. For using this attribute we use a global authentication filter for the appl...

Comparison of Asp.Net Web Form and Asp.Net MVC

Asp.net framework is a part of .net platform for building web applications. Now, with arrival of MVC framework developers have the option of using Asp.Net Web Form or Asp.Net MVC. In this article, we will see the main difference between Asp.Net W...

ASP.NET MVC : Filters and Attributes

ASP.NET MVC provides a simple way to inject the pre-processing and post-processing logic for an action. This is achieved by adorning the controllers/ actions with ASP.NET MVC attributes. For example in the below piece of code we have adorned ...

How to change the default controller in ASP.NET MVC

Many times we need to change the default controller in ASP.NET MVC. To change this first we need to understand how the default route is configured. This setting is available in RouteConfig file (under App_Start folder). routes.MapRoute( ...

How to overload the action Method in ASP.NET MVC

In this article we will see how to overload the action Method in ASP.NET MVC. Overloading is the scenario where we have two methods with the same name but different signatures. At compile time, the compiler finds out which method it is going t...

Comparison of ViewData, ViewBag and TempData

Generally in ASP.NET MVC we use the ViewData,ViewBag, and TempData objects for the purposes of moving data beween views or from controller to views.In this post we compare them against each other higlighting there difference and usage patterns...

How to use TempData to pass data ?

ASP.NET MVC TempData object is used to share data between controller actions.It is a dictionary object derived from TempDataDictionary. The value of TempData persists until it is read or until the current users session times out.TempdData can b...

How to handle Error 404 in ASP.NET MVC

In the following article we will learn how to handle 404 errors in ASP.NET MVC gracefully. The first step will be to set up the custom errors page by making the following settings in web.config: <system.web> <compilation d...

ASP.NET MVC: How to Check Session Timeout and Redirect to Login Page

The following post captures the implementation details to manage session timeout in ASP.NET MVC. If session has expired we will redirect the user to login page First you need to make modificaions in web.config as below: <system.web>...

How to Upload a file in ASP.NET MVC

The following post captures the implementation details for uploading file in ASP.NET MVC. First we need to create HTML form which would receive the file as input: @using (Html.BeginForm("Index", "Home", FormMethod.Post, new { enctype = "m...

How to create a dropdownlist from an enum in ASP.NET MVC

Many times in an application we need to populate a dropdown list from enum.In the following article I will show how to implement the same using SelectListItem. First we create an enum, FileType, under the Models folder as shown below. na...

How to show checkbox selected using MVCCheckBoxList in Asp.Net MVC

How to show checkbox selected using MVCCheckBoxList in Asp.Net MVC In my previous blog I have discussed about how to use MVCCheckBoxList. Please visit the following link for reference: MVCCheckBoxList in Asp.Net MVC Issue: The problem w...

How to bind RadioButton using Enum in Asp.Net MVC

How to bind RadioButton using Enum in Asp.Net MVC For binding RadioButton using Enum in Asp.Net MVC, we have to follow the following steps:- Step1: First create the Model class say 'RegisterationModel' in the Models Folder for the RadioBut...

How to use CheckBoxList in Asp.Net MVC

How to use CheckBoxList in Asp.Net MVC For using CheckBoxList in Asp.Net MVC, we have to follow the following steps:- Step1: First download the CheckBoxList from Nuget, Once it is downloaded we can see the reference of MVCCheckBoxList in ...

How to make a Grid in Asp.Net MVC

How to make a Grid in Asp.Net MVC In this Blog we will see, how to make a Grid using WebGrid in Asp .Net MVC. Step 1: Create a MVC application. Step 2: Now make a Model say Student which will hold the data to be displayed in the Grid. ...

How to bind DropDown using model in Asp.Net MVC

How to bind DropDown using model in Asp.Net MVC For Binding the Dropdown using Model, we have to follow the following steps:- Step 1: First create a model as follows:- Example: Public Class DropdownBind { public List<SelectListI...

How to bind a Dropdown without using Model in Asp.Net MVC

How to bind a Dropdown without using Model in Asp.Net MVC For Binding the Dropdown without using Model, we have to follow the following steps:- Step1: Firstly in the Controller create an instance of List<selectlistitem> and add items ...

Bundling in Asp.Net MVC

Bundling in Asp.Net MVC What Bundling is actually:         It is a process of grouping files into a Bundle, so that they can be loaded through one HTTP request and can be referenced by a unique Bundle Name. Need of B...

ASP-Net-MVC-The CRUD-Part -2 Details Update and Delete

Hi Friends! I hope you'll be waiting for the next part of my previous CRUD article. So let's go for it. We'll perform the rest of the actions in following sequence. 1-Details 2-Edit/Update 3-Delete Before moving to any method ,we need to...

Route Config in Asp.Net MVC

"Basics of Route Config in Asp.Net MVC"     Routing is one of the primary concern of MVC. In MVC we have to map URL to a particular Action method on a particular Controller, the Action Method is then executed and returns a...

How to make JSON.NET as the default JSON serializer in ASP.NET MVC

"Making JSON.NET as the default JSON serializer in ASP.NET MVC"     The default JSON serializer in Asp.Net MVC is JavascriptSerializer.   In this article I will explain how to replace the JavascriptSerializer fo...

ASP-Net-MVC-The CRUD-Part -1 Insert and Show

Hi Friends,I am back with my MVC article with some new things. So we've covered the concept and structure of an MVC application in my previous article which are listed below:- 1-ASP-Net-MVC-What-s-inside-Part1 2-ASP-Net-MVC-What-s-inside-Pa...

How to use Partial View in Asp.Net MVC

"Partial View in Asp.Net MVC" Key Features: 1. The View defined inside the parent View is called the Partial View. 2. It is same like a user control (.ascx) in Asp.Net. 3. The Partial View has access to the data of the parent View. 4. ...

How to make Custom Error pages in Asp.Net MVC

"Custom Error pages in Asp.Net MVC"     In this article we will learn how to make custom error pages in Asp.Net MVC. Getting Started:     By default if we get any exception while running our code, w...

How to Upload File in ASP.NET MVC

"File Upload in ASP.NET MVC"     File upload is one of the common feature that is required in almost every application. In this article we will discuss how to use this upload file functionality in Asp .Net MVC. Step 1: I...

ASP.Net MVC-What's inside-Part2

This is the continuation of Part 1 of article-ASP.Net MIC-What's inside Now we come to 3 folders which are building blocks of any MVC application. So let us start with controller. Controller:-      Here we can create ...

ASP.Net MVC-What's inside-Part1

The previous article shows a conceptual flow in ASP.Net MVC framework. There we saw that the controller is the central point of execution in MVC.And as you have gone through two theoretical articles on MVC flow, I think you've understood why con...

Difference between TextBoxFor and EditorFor in MVC

These two are strongly-typed HTML helper methods and uses lambda expressions when referencing models passed to a view template. TextBoxFor will always show the textbox element no matter which kind of property we are binding it with. But Ed...

ASP.Net MVC-The Flow

In my previous article we talked about benefits of using MVC. MVC is a buzzword these days in IT industry. If we talk about a generic MVC pattern,currently it is used in every language available. Some of the examples include: 1-Cake PHP 2-Rub...

Asp.Net Webforms vs ASP.Net MVC

Asp.Net MVC is currently used and much embraced architecture in software development. It offers a layered approach to development by it's default configuration, and facilitates unit testing...

ASP.net mvc with unit test example

"ASP.net mvc with unit test example" In this blog we will discuss how to write unit tests for the controllers in our ASP.NET MVC applications. We will write following three Test cases: Test for the view returned by a controller action ...

What is Glimpse in asp.net and MVC?

Glimpse is an open source tool to Check the performance of every page in asp.net OR MVC. You can install it in very simple way. 1. search the key word Glimpse in NuGet and you will find different versions for Glimpe Asp.Net, Glimpe MVC, Glimpe ...

Installing Clean Windows Web Server 2008 R2 64-bit with IIS 7.5

While Installing Clean Windows Web Server 2008 R2 64-bit with IIS 7.5, If you receive the following errors when opening .NET 2.0 / .NET 4.0 application: 1. Managed handler is used; however, ASP.NET is not installed or is not installed completel...

jqGrid with asp.net MVC

To bind jqGrid with asp.net MVC please see below steps. step 1: Download latest jqGrid from http://olex.openlogic.com/packages/jqgrid/ http://www.trirand.com/blog/?page_id=6 step 2: Add downloaded folder into your project's Script fo...
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: